package cn.itcast.provider.config;

import cn.itcast.provider.clients.UserClientFallback;
import feign.Logger;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author 虎哥
 */
// 开启Feign的客户端功能
@EnableFeignClients(basePackages = "cn.itcast.provider.clients")
@Configuration
public class FeignConfig {

    @Bean
    public Logger.Level logLevel(){
        return Logger.Level.FULL;
    }

    @Bean
    public UserClientFallback userClientFallback(){
        return new UserClientFallback();
    }
}
